/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
package eypweb_bsc;

import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;

/**
 *
 * @author Baalor
 */

// devizanem torzset megvalosito osztaly
public class Currency {
    
    // azonosito
    private int id;
    // megnevezes
    private StringProperty name;
    // vetitesi egyseg
    private StringProperty unit;
    // hataly kezdete
    private StringProperty startDate;
    // hataly vege
    private StringProperty endDate;
    // mpdpsitas flag
    private boolean modified;

    public Currency() {
        modified = false;
    }

    public void setModified(){
        modified = true;
    }
    
    public boolean getModified(){
        return modified;
    }
    
    public void setId(int i)
    {
        id = i;
    }
    
    public int getId()
    {
        return id;
    }
    
    public StringProperty nameProperty() {
        if (name == null) {
            name = new SimpleStringProperty(this, "name");
        }
        return name;
    }

    public void setName(String value) {
        nameProperty().set(value);
    }

    public String getName() {
        return nameProperty().get();
    }

    public StringProperty startDateProperty() {
        if (startDate == null) {
            startDate = new SimpleStringProperty(this, "startDate");
        }
        return startDate;
    }

    public void setStartDate(String value) {
        startDateProperty().set(value);
    }

    public String getStartDate() {
        return startDateProperty().get();
    }

    public StringProperty endDateProperty() {
        if (endDate == null) {
            endDate = new SimpleStringProperty(this, "endDate");
        }
        return endDate;
    }

    public void setEndDate(String value) {
        endDateProperty().set(value);
    }

    public String getEndDate() {
        return endDateProperty().get();
    }
    
    public StringProperty unitProperty()
    {
        if (unit == null) {
            unit = new SimpleStringProperty(this, "unit");
        }
        return unit;
    }
    
    public void setUnit(String value)
    {
        unitProperty().set(value);
    }
    
    public String getUnit(){
        return unitProperty().get();
    }
}
